-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/ Consoles - Extract console tabs into components #2189
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tabs seem to be working for PC/AC/SAC consoles
<ConsoleTabs | ||
defaultActiveTabId="overview" | ||
tabs={[ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The AC and Reviewer console have updateActiveTabId={setActiveTabId}
set, do we not need this for the other consoles?
if (!validTabIds.includes(activeTabId)) { | ||
setActiveTabId(defaultActiveTabId) | ||
updateActiveTabId?.(`#${defaultActiveTabId}`) | ||
return | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to call updateActiveTabId
here? I think when setActiveTabId
is called it will trigger useEffect again with a valid (default) tab, so the parent's state would already get updated in line 20 with the default. What do you think?
this pr should consolidate the tabs and active tab logic to a separate component so that related logic are not duplicated in all consoles and can be better tested